package bestbuy;

import java.util.ArrayList;

import promotionCoupon.Coupon;
import secondaryHeader.SecondaryHeader;
import currentRebate.Rebate;

public class Factory {
	
	private ArrayList<Rebate> rebates = new ArrayList<Rebate>();
	private ArrayList<Coupon> coupons = new ArrayList<Coupon>();
	private SecondaryHeader[] sHeaders = new SecondaryHeader[3];
	ReceiptInterface myReceipt;
	
	
	public Factory() {
		myReceipt = new Receipt();
		
		init();
	}

	public Factory(PurchaseItem item) {
		myReceipt = new Receipt(item);
		
		init();

	}
	
	public void init() {
		myReceipt = new SecondaryHeader(myReceipt,"Happy Holidays!");
		myReceipt = new Coupon(myReceipt);
		myReceipt = new Rebate(myReceipt);
		
		
		
		
		sHeaders[0]= new SecondaryHeader(myReceipt,"Happy Holidays!");
		sHeaders[1]= new SecondaryHeader(myReceipt,"Summer Sales are Hot!");
		sHeaders[2]= new SecondaryHeader(myReceipt,"Happy Black Friday!");
		
		
		/*myReceipt = new SecondaryHeader(myReceipt,"Happy Holidays!");
		myReceipt = sHeaders[1];*/
		
		System.out.println(myReceipt.getReceipt());
	}
}
